<template>
	<view class="">
		<view class="cf-container">
			<view class="tab">
				<view @click="changeState(1)"><text :class="state == 1 ? 'ns-text-color active ns-border-color-bottom' : ''">未使用</text></view>
				<view @click="changeState(2)"><text :class="state == 2 ? 'ns-text-color active ns-border-color-bottom' : ''">已使用</text></view>
				<view @click="changeState(3)"><text :class="state == 3 ? 'ns-text-color active ns-border-color-bottom' : ''">已过期</text></view>
			</view>
		</view>
		<mescroll-uni @getData="getCounponList" ref="mescroll" top="100">
			<block slot="list">
				<view class="coupon-list">
					<view class="coupon-item u-flex u-flex-between">
						<view class="l">
							<view class="t1">手机消费赠送</view>
							<view class="t2">APP5元面包卷满20可用</view>
							<view class="t3">有效期2020.3.5 -2020.9.20</view>
						</view>
						<view class="r u-flex u-flex-center u-flex-y-center">
							<view class="m ">
								<text>¥</text>5
							</view>
						</view>
					</view>
					<view class="coupon-item u-flex u-flex-between out">
						<view class="l">
							<view class="t1">手机消费赠送</view>
							<view class="t2">APP5元面包卷满20可用</view>
							<view class="t3">有效期2020.3.5 -2020.9.20</view>
						</view>
						<view class="r u-flex u-flex-center u-flex-y-center">
							<view class="m ">
								<text>¥</text>5
							</view>
						</view>
					</view>
				</view>
			</block>
		</mescroll-uni>
		<!-- <loading-cover ref="loadingCover"></loading-cover> -->
		
	</view>
</template>

<script>

	export default{
		components:{
			
		},
		data() {
			return {
				state: 1,
			}
		},
		  computed: {
		      
		    },
		onLoad() {
		
		},
		methods: {
			changeState(state) {
				this.list = [];
				this.state = state;
				this.$refs.mescroll.refresh(false);
			},
			getCounponList(){
				
			}
		}
	}
</script>

<style lang="scss">
	.cf-container {
		background: #fff;
		overflow: hidden;
	}
	.active {
		border-bottom:4rpx solid #BEB49D;
		color: #BEB49D;
	}
	.tab {
		display: flex;
		justify-content: space-between;
	
		> view {
			text-align: center;
			width: 33%;
	
			text {
				display: inline-block;
				line-height: 58rpx;
			}
		}
	}
	
	.coupon-item{
		padding: 20rpx;color: #fff;margin: 20rpx auto 0;
		width: 666rpx;height: 186rpx;background: green;
		.t1{
			font-size: 32rpx;
		}
		.t2{
			font-size: 24rpx;margin-left: 24rpx;
		}
		.t3{font-size: 20rpx;margin-top: 26rpx;}
		.r{
			width: 200rpx;
			.m{
				color:#000 ;
				font-size: 80rpx;
				text{
					font-size: 20rpx;
					
				}
			}
		}
		&.out{
			filter: grayscale(1);
			opacity: .6;
		}
	}
</style>